package com.spboot.entity;

import java.math.BigDecimal;

import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.solr.core.mapping.SolrDocument;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author guocb
 * @since 2020-01-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@SolrDocument(collection = "pro_core") //将实体solr core映射关系
public class Product implements Serializable {

    private static final long serialVersionUID=1L;

    @Field//solr 字段
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Field
    private String proName;

    @Field
    private Double proPrice;

    @Field
    private Integer proNum;


    //表中列对应的常量
    public static final String ID = "id";

    public static final String PRONAME = "proName";

    public static final String PROPRICE = "proPrice";

    public static final String PRONUM = "proNum";

}
